import { Ld } from './util';

const CoreEnterpriseList = Ld(() =>
  import(
    /* webpackChunkName: "CoreEnterpriseList" */
    'src/pages/internetCommercialBank/coreEnterprise/CoreEnterpriseList'
  ),
);
const CoreEnterpriseDetail = Ld(() =>
  import(
    /* webpackChunkName: "CoreEnterpriseDetail" */
    'src/pages/internetCommercialBank/coreEnterprise/CoreEnterpriseDetail'
  ),
);
const DealerList = Ld(() =>
  import(/* webpackChunkName: "DealerList" */ 'src/pages/internetCommercialBank/dealer/DealerList'),
);
const DealerDetail = Ld(() =>
  import(/* webpackChunkName: "DealerDetail" */ 'src/pages/internetCommercialBank/dealer/DealerDetail'),
);
const BankPaymentTurnoverList = Ld(() =>
  import(
    /* webpackChunkName: "BankOrderList" */
    'src/pages/internetCommercialBank/paymentTurnover/BankPaymentTurnoverList'
  ),
);
/**
 * 网商银行路由
 * */
function internetCommercialBankRoutes() {
  return [
    {
      path: 'internetCommercialBank',
      isLayout: true,
      meta: {
        title: '网商银行',
      },
      children: [
        {
          path: 'coreEnterprise',
          meta: {
            title: '核心企业管理',
          },
          isElement: true,
          children: [
            {
              path: '',
              element: <CoreEnterpriseList />,
              meta: {
                title: '列表',
              },
            },
            {
              path: 'coreEnterpriseDetail',
              element: <CoreEnterpriseDetail />,
              meta: {
                title: '明细',
              },
            },
          ],
        },
        {
          path: 'dealer',
          meta: {
            title: '经销商管理',
          },
          isElement: true,
          children: [
            {
              path: '',
              meta: {
                title: '列表',
              },
              element: <DealerList />,
            },
            {
              path: 'dealerDetail',
              meta: {
                title: '明细',
              },
              element: <DealerDetail />,
            },
          ],
        },
        {
          path: 'bankPaymentTurnoverList',
          meta: {
            title: '支付流水查询',
          },
          element: <BankPaymentTurnoverList />,
        },
      ],
    },
  ];
}

export default internetCommercialBankRoutes;
